package rootpw;

// TO-DO: error checking all over the place
// TO-DO: timeout counter should reset when a password is selected
// TO-DO: option to strip carriage-returns from passwords
// TO-DO: options file?

public final class AgentApp 
{
	 
	 public static void main(String... aArgs)
	 {
		 	GnuPG gpg 			= null;
			AgentListBuilder lb = null;
			 
		    
		    // global exception handler
		 	System.setProperty("sun.awt.exception.handler", AwtHandler.class.getName());
		 	
		 	// fetch the encrypted blob from the web
		 	AgentBlobFetcher bf = new AgentBlobFetcher();
		 	
		 	// decrypt the blob w/ GnuPG wrapper
	        gpg = new GnuPG();
	        gpg.decrypt(bf.blob, "<no passphrase>");

		 	// create and populate lists of hosts & passwords from blob
	        lb = new AgentListBuilder(gpg.getResult());
	        	        
	        // create a UI using the hosts and passwords
		    new AgentUI(lb);	
	 }		    
}